{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Source of the materials**: Biopython cookbook (adapted)\n",
    "<font color='red'>Status: Draft</font>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The Biopython testing framework {#sec:regr_test}\n",
    "===============================\n",
    "\n",
    "Biopython has a regression testing framework (the file `run_tests.py`)\n",
    "based on [unittest](http://docs.python.org/library/unittest.html), the\n",
    "standard unit testing framework for Python. Providing comprehensive\n",
    "tests for modules is one of the most important aspects of making sure\n",
    "that the Biopython code is as bug-free as possible before going out. It\n",
    "also tends to be one of the most undervalued aspects of contributing.\n",
    "This chapter is designed to make running the Biopython tests and writing\n",
    "good test code as easy as possible. Ideally, every module that goes into\n",
    "Biopython should have a test (and should also have documentation!). All\n",
    "our developers, and anyone installing Biopython from source, are\n",
    "strongly encouraged to run the unit tests.\n",
    "\n",
    "Running the tests\n",
    "-----------------\n",
    "\n",
    "When you download the Biopython source code, or check it out from our\n",
    "source code repository, you should find a subdirectory call `Tests`.\n",
    "This contains the key script `run_tests.py`, lots of individual scripts\n",
    "named `test_XXX.py`, a subdirectory called `output` and lots of other\n",
    "subdirectories which contain input files for the test suite.\n",
    "\n",
    "As part of building and installing Biopython you will typically run the\n",
    "full test suite at the command line from the Biopython source top level\n",
    "directory using the following:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```\n",
    "python setup.py test\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "This is actually equivalent to going to the `Tests` subdirectory and\n",
    "running:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```\n",
    "python run_tests.py\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "You’ll often want to run just some of the tests, and this is done like\n",
    "this:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```\n",
    "python run_tests.py test_SeqIO.py test_AlignIO.py\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "When giving the list of tests, the `.py` extension is optional, so you\n",
    "can also just type:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```\n",
    "python run_tests.py test_SeqIO test_AlignIO\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "To run the docstring tests (see section \\[section:doctest\\]), you can\n",
    "use\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```bash\n",
    "python run_tests.py doctest\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "By default, `run_tests.py` runs all tests, including the docstring\n",
    "tests.\n",
    "\n",
    "If an individual test is failing, you can also try running it directly,\n",
    "which may give you more information.\n",
    "\n",
    "Importantly, note that the individual unit tests come in two types:\n",
    "\n",
    "-   Simple print-and-compare scripts. These unit tests are essentially\n",
    "    short example Python programs, which print out various output text.\n",
    "    For a test file named `test_XXX.py` there will be a matching text\n",
    "    file called `test_XXX` under the `output` subdirectory which\n",
    "    contains the expected output. All that the test framework does to is\n",
    "    run the script, and check the output agrees.\n",
    "\n",
    "-   Standard `unittest`- based tests. These will `import unittest` and\n",
    "    then define `unittest.TestCase` classes, each with one or more\n",
    "    sub-tests as methods starting with `test_` which check some specific\n",
    "    aspect of the code. These tests should not print any\n",
    "    output directly.\n",
    "\n",
    "Currently, about half of the Biopython tests are `unittest`-style tests,\n",
    "and half are print-and-compare tests.\n",
    "\n",
    "Running a simple print-and-compare test directly will usually give lots\n",
    "of output on screen, but does not check the output matches the expected\n",
    "output. If the test is failing with an exception error, it should be\n",
    "very easy to locate where exactly the script is failing. For an example\n",
    "of a print-and-compare test, try:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```bash\n",
    "python test_SeqIO.py\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "The `unittest`-based tests instead show you exactly which sub-section(s)\n",
    "of the test are failing. For example,\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```bash\n",
    "python test_Cluster.py\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "### Running the tests using Tox\n",
    "\n",
    "Like most Python projects, you can also use\n",
    "[Tox](http://tox.readthedocs.org/en/latest/) to run the tests on\n",
    "multiple Python versions, provided they are already installed in your\n",
    "system.\n",
    "\n",
    "We do not provide the configuration `tox.ini` file in our code base\n",
    "because of difficulties pinning down user-specific settings (e.g.\n",
    "executable names of the Python versions). You may also only be\n",
    "interested in testing Biopython only against a subset of the Python\n",
    "versions that we support.\n",
    "\n",
    "If you are interested in using Tox, you may start with the example\n",
    "`tox.ini` shown below:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```ini\n",
    "[tox]\n",
    "envlist = py26, py27, pypy, py33, py34, jython\n",
    "\n",
    "[testenv]\n",
    "changedir = Tests\n",
    "commands = {envpython} run_tests.py --offline\n",
    "deps =\n",
    "    numpy\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "Using the template above, executing `tox` will test your Biopython code\n",
    "against Python2.6, Python2.7, PyPy, Python3.3, Python3.4, and Jython. It\n",
    "assumes that those Pythons’ executables are named accordingly: python2.6\n",
    "for Python2.6, and so on.\n",
    "\n",
    "Writing tests\n",
    "-------------\n",
    "\n",
    "Let’s say you want to write some tests for a module called `Biospam`.\n",
    "This can be a module you wrote, or an existing module that doesn’t have\n",
    "any tests yet. In the examples below, we assume that `Biospam` is a\n",
    "module that does simple math.\n",
    "\n",
    "Each Biopython test can have three important files and directories\n",
    "involved with it:\n",
    "\n",
    "1.  `test_Biospam.py` – The actual test code for your module.\n",
    "\n",
    "2.  `Biospam` \\[optional\\]– A directory where any necessary input files\n",
    "    will be located. Any output files that will be generated should also\n",
    "    be written here (and preferably cleaned up after the tests are done)\n",
    "    to prevent clogging up the main Tests directory.\n",
    "\n",
    "3.  `output/Biospam` – \\[for print-and-compare tests only\\] This file\n",
    "    contains the expected output from running `test_Biospam.py`. This\n",
    "    file is not needed for `unittest`-style tests, since there the\n",
    "    validation is done in the test script `test_Biospam.py` itself.\n",
    "\n",
    "It’s up to you to decide whether you want to write a print-and-compare\n",
    "test script or a `unittest`-style test script. The important thing is\n",
    "that you cannot mix these two styles in a single test script.\n",
    "Particularly, don’t use `unittest` features in a print-and-compare test.\n",
    "\n",
    "Any script with a `test_` prefix in the `Tests` directory will be found\n",
    "and run by `run_tests.py`. Below, we show an example test script\n",
    "`test_Biospam.py` both for a print-and-compare test and for a\n",
    "`unittest`-based test. If you put this script in the Biopython `Tests`\n",
    "directory, then `run_tests.py` will find it and execute the tests\n",
    "contained in it:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```bash\n",
    "$ python run_tests.py\n",
    "test_Ace ... ok\n",
    "test_AlignIO ... ok\n",
    "test_BioSQL ... ok\n",
    "test_BioSQL_SeqIO ... ok\n",
    "test_Biospam ... ok\n",
    "test_CAPS ... ok\n",
    "test_Clustalw ... ok\n",
    "…\n",
    "----------------------------------------------------------------------\n",
    "Ran 107 tests in 86.127 seconds\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "### Writing a print-and-compare test\n",
    "\n",
    "A print-and-compare style test should be much simpler for beginners or\n",
    "novices to write - essentially it is just an example script using your\n",
    "new module.\n",
    "\n",
    "Here is what you should do to make a print-and-compare test for the\n",
    "`Biospam` module.\n",
    "\n",
    "1.  Write a script called `test_Biospam.py`\n",
    "\n",
    "    -   This script should live in the Tests directory\n",
    "\n",
    "    -   The script should test all of the important functionality of the\n",
    "        module (the more you test the better your test is, of course!).\n",
    "\n",
    "    -   Try to avoid anything which might be platform specific, such as\n",
    "        printing floating point numbers without using an explicit\n",
    "        formatting string to avoid having too many decimal places\n",
    "        (different platforms can give very slightly different values).\n",
    "\n",
    "2.  If the script requires files to do the testing, these should go in\n",
    "    the directory Tests/Biospam (if you just need something generic,\n",
    "    like a FASTA sequence file, or a GenBank record, try and use an\n",
    "    existing sample input file instead).\n",
    "\n",
    "3.  Write out the test output and verify the output to be correct.\n",
    "\n",
    "    There are two ways to do this:\n",
    "\n",
    "    1.  The long way:\n",
    "\n",
    "        -   Run the script and write its output to a file. On UNIX\n",
    "            (including Linux and Mac OS X) machines, you would do\n",
    "            something like: `python test_Biospam.py > test_Biospam`\n",
    "            which would write the output to the file `test_Biospam`.\n",
    "\n",
    "        -   Manually look at the file `test_Biospam` to make sure the\n",
    "            output is correct. When you are sure it is all right and\n",
    "            there are no bugs, you need to quickly edit the\n",
    "            `test_Biospam` file so that the first line is:\n",
    "            ‘`test_Biospam`’ (no quotes).\n",
    "\n",
    "        -   copy the `test_Biospam` file to the directory Tests/output\n",
    "\n",
    "    2.  The quick way:\n",
    "\n",
    "        -   Run `python run_tests.py -g test_Biospam.py`. The regression\n",
    "            testing framework is nifty enough that it’ll put the output\n",
    "            in the right place in just the way it likes it.\n",
    "\n",
    "        -   Go to the output (which should be in\n",
    "            `Tests/output/test_Biospam`) and double check the output to\n",
    "            make sure it is all correct.\n",
    "\n",
    "4.  Now change to the Tests directory and run the regression tests with\n",
    "    `python run_tests.py`. This will run all of the tests, and you\n",
    "    should see your test run (and pass!).\n",
    "\n",
    "5.  That’s it! Now you’ve got a nice test for your module ready to check\n",
    "    in, or submit to Biopython. Congratulations!\n",
    "\n",
    "As an example, the `test_Biospam.py` test script to test the `addition`\n",
    "and `multiplication` functions in the `Biospam` module could look as\n",
    "follows:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "from __future__ import print_function\n",
    "from Bio import Biospam\n",
    "\n",
    "print(\"2 + 3 =\", Biospam.addition(2, 3))\n",
    "print(\"9 - 1 =\", Biospam.addition(9, -1))\n",
    "print(\"2 * 3 =\", Biospam.multiplication(2, 3))\n",
    "print(\"9 * (- 1) =\", Biospam.multiplication(9, -1))\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "We generate the corresponding output with\n",
    "`python run_tests.py -g test_Biospam.py`, and check the output file\n",
    "`output/test_Biospam`:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "test_Biospam\n",
    "2 + 3 = 5\n",
    "9 - 1 = 8\n",
    "2 * 3 = 6\n",
    "9 * (- 1) = -9\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "Often, the difficulty with larger print-and-compare tests is to keep\n",
    "track which line in the output corresponds to which command in the test\n",
    "script. For this purpose, it is important to print out some markers to\n",
    "help you match lines in the input script with the generated output.\n",
    "\n",
    "### Writing a unittest-based test\n",
    "\n",
    "We want all the modules in Biopython to have unit tests, and a simple\n",
    "print-and-compare test is better than no test at all. However, although\n",
    "there is a steeper learning curve, using the `unittest` framework gives\n",
    "a more structured result, and if there is a test failure this can\n",
    "clearly pinpoint which part of the test is going wrong. The sub-tests\n",
    "can also be run individually which is helpful for testing or debugging.\n",
    "\n",
    "The `unittest`-framework has been included with Python since version\n",
    "2.1, and is documented in the Python Library Reference (which I know you\n",
    "are keeping under your pillow, as recommended). There is also [online\n",
    "documentaion for\n",
    "unittest](http://docs.python.org/library/unittest.html). If you are\n",
    "familiar with the `unittest` system (or something similar like the nose\n",
    "test framework), you shouldn’t have any trouble. You may find looking at\n",
    "the existing example within Biopython helpful too.\n",
    "\n",
    "Here’s a minimal `unittest`-style test script for `Biospam`, which you\n",
    "can copy and paste to get started:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "import unittest\n",
    "from Bio import Biospam\n",
    "\n",
    "class BiospamTestAddition(unittest.TestCase):\n",
    "\n",
    "    def test_addition1(self):\n",
    "        result = Biospam.addition(2, 3)\n",
    "        self.assertEqual(result, 5)\n",
    "\n",
    "    def test_addition2(self):\n",
    "        result = Biospam.addition(9, -1)\n",
    "        self.assertEqual(result, 8)\n",
    "\n",
    "class BiospamTestDivision(unittest.TestCase):\n",
    "\n",
    "    def test_division1(self):\n",
    "        result = Biospam.division(3.0, 2.0)\n",
    "        self.assertAlmostEqual(result, 1.5)\n",
    "\n",
    "    def test_division2(self):\n",
    "        result = Biospam.division(10.0, -2.0)\n",
    "        self.assertAlmostEqual(result, -5.0)\n",
    "\n",
    "\n",
    "if __name__ == \"__main__\":\n",
    "    runner = unittest.TextTestRunner(verbosity = 2)\n",
    "    unittest.main(testRunner=runner)\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "In the division tests, we use `assertAlmostEqual` instead of\n",
    "`assertEqual` to avoid tests failing due to roundoff errors; see the\n",
    "`unittest` chapter in the Python documentation for details and for other\n",
    "functionality available in `unittest` ([online\n",
    "reference](http://docs.python.org/library/unittest.html)).\n",
    "\n",
    "These are the key points of `unittest`-based tests:\n",
    "\n",
    "-   Test cases are stored in classes that derive from\n",
    "    `unittest.TestCase` and cover one basic aspect of your code\n",
    "\n",
    "-   You can use methods `setUp` and `tearDown` for any repeated code\n",
    "    which should be run before and after each test method. For example,\n",
    "    the `setUp` method might be used to create an instance of the object\n",
    "    you are testing, or open a file handle. The `tearDown` should do any\n",
    "    “tidying up”, for example closing the file handle.\n",
    "\n",
    "-   The tests are prefixed with `test_` and each test should cover one\n",
    "    specific part of what you are trying to test. You can have as many\n",
    "    tests as you want in a class.\n",
    "\n",
    "-   At the end of the test script, you can use\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "if __name__ == \"__main__\":\n",
    "        runner = unittest.TextTestRunner(verbosity = 2)\n",
    "        unittest.main(testRunner=runner)\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "    to execute the tests when the script is run by itself (rather than\n",
    "    imported from `run_tests.py`). If you run this script, then you’ll\n",
    "    see something like the following:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "$ python test_BiospamMyModule.py\n",
    "test_addition1 (__main__.TestAddition) ... ok\n",
    "test_addition2 (__main__.TestAddition) ... ok\n",
    "test_division1 (__main__.TestDivision) ... ok\n",
    "test_division2 (__main__.TestDivision) ... ok\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "-   To indicate more clearly what each test is doing, you can add\n",
    "    docstrings to each test. These are shown when running the tests,\n",
    "    which can be useful information if a test is failing.\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "import unittest\n",
    "    from Bio import Biospam\n",
    "\n",
    "    class BiospamTestAddition(unittest.TestCase):\n",
    "\n",
    "        def test_addition1(self):\n",
    "            \"\"\"An addition test\"\"\"\n",
    "            result = Biospam.addition(2, 3)\n",
    "            self.assertEqual(result, 5)\n",
    "\n",
    "        def test_addition2(self):\n",
    "            \"\"\"A second addition test\"\"\"\n",
    "            result = Biospam.addition(9, -1)\n",
    "            self.assertEqual(result, 8)\n",
    "\n",
    "    class BiospamTestDivision(unittest.TestCase):\n",
    "\n",
    "        def test_division1(self):\n",
    "            \"\"\"Now let's check division\"\"\"\n",
    "            result = Biospam.division(3.0, 2.0)\n",
    "            self.assertAlmostEqual(result, 1.5)\n",
    "\n",
    "        def test_division2(self):\n",
    "            \"\"\"A second division test\"\"\"\n",
    "            result = Biospam.division(10.0, -2.0)\n",
    "            self.assertAlmostEqual(result, -5.0)\n",
    "\n",
    "\n",
    "    if __name__ == \"__main__\":\n",
    "        runner = unittest.TextTestRunner(verbosity = 2)\n",
    "        unittest.main(testRunner=runner)\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "    Running the script will now show you:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "```bash\n",
    "$ python test_BiospamMyModule.py\n",
    "An addition test ... ok\n",
    "A second addition test ... ok\n",
    "Now let's check division ... ok\n",
    "A second division test ... ok\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "If your module contains docstring tests (see section\n",
    "\\[section:doctest\\]), you may want to include those in the tests to be\n",
    "run. You can do so as follows by modifying the code under\n",
    "`if __name__ == \"__main__\":` to look like this:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "if __name__ == \"__main__\":\n",
    "    unittest_suite = unittest.TestLoader().loadTestsFromName(\"test_Biospam\")\n",
    "    doctest_suite = doctest.DocTestSuite(Biospam)\n",
    "    suite = unittest.TestSuite((unittest_suite, doctest_suite))\n",
    "    runner = unittest.TextTestRunner(sys.stdout, verbosity = 2)\n",
    "    runner.run(suite)\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "This is only relevant if you want to run the docstring tests when you\n",
    "execute `python test_Biospam.py`; with `python run_tests.py`, the\n",
    "docstring tests are run automatically (assuming they are included in the\n",
    "list of docstring tests in `run_tests.py`, see the section below).\n",
    "\n",
    "Writing doctests {#section:doctest}\n",
    "----------------\n",
    "\n",
    "Python modules, classes and functions support built in documentation\n",
    "using docstrings. The [doctest\n",
    "framework](http://docs.python.org/library/doctest.html) (included with\n",
    "Python) allows the developer to embed working examples in the\n",
    "docstrings, and have these examples automatically tested.\n",
    "\n",
    "Currently only a small part of Biopython includes doctests. The\n",
    "`run_tests.py` script takes care of running the doctests. For this\n",
    "purpose, at the top of the `run_tests.py` script is a manually compiled\n",
    "list of modules to test, which allows us to skip modules with optional\n",
    "external dependencies which may not be installed (e.g. the Reportlab and\n",
    "NumPy libraries). So, if you’ve added some doctests to the docstrings in\n",
    "a Biopython module, in order to have them included in the Biopython test\n",
    "suite, you must update `run_tests.py` to include your module. Currently,\n",
    "the relevant part of `run_tests.py` looks as follows:\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```python\n",
    "# This is the list of modules containing docstring tests.\n",
    "# If you develop docstring tests for other modules, please add\n",
    "# those modules here.\n",
    "DOCTEST_MODULES = [\"Bio.Seq\",\n",
    "                   \"Bio.SeqRecord\",\n",
    "                   \"Bio.SeqIO\",\n",
    "                   \"...\",\n",
    "                  ]\n",
    "#Silently ignore any doctests for modules requiring numpy!\n",
    "try:\n",
    "    import numpy\n",
    "    DOCTEST_MODULES.extend([\"Bio.Statistics.lowess\"])\n",
    "except ImportError:\n",
    "    pass\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "Note that we regard doctests primarily as documentation, so you should\n",
    "stick to typical usage. Generally complicated examples dealing with\n",
    "error conditions and the like would be best left to a dedicated unit\n",
    "test.\n",
    "\n",
    "Note that if you want to write doctests involving file parsing, defining\n",
    "the file location complicates matters. Ideally use relative paths\n",
    "assuming the code will be run from the `Tests` directory, see the\n",
    "`Bio.SeqIO` doctests for an example of this.\n",
    "\n",
    "To run the docstring tests only, use\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "```bash\n",
    "$ python run_tests.py doctest\n",
    "\n",
    "```"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
